#ifndef __WIDGETBOXW_H_
#define __WIDGETBOXW_H_

#include <QWidget>

QT_FORWARD_DECLARE_CLASS(QDesignerWidgetBoxInterface)

class WidgetBoxW : public QWidget
{
    Q_OBJECT
    Q_CLASSINFO("ClassID", "{766264e1-dfd0-4b3c-be15-fbb0437e902c}")
    Q_CLASSINFO("InterfaceID", "{159c7461-9909-4cd9-b713-ed90774fbdf0}")
    Q_CLASSINFO("EventsID", "{0db54a24-47d2-48ea-845c-8c3a6843bae1}")
    Q_CLASSINFO("ToSuperClass", "WidgetBoxW")

public:
    WidgetBoxW(QWidget *parent = 0);
    ~WidgetBoxW();

    QSize minimumSize();
    static WidgetBoxW *instance();

public Q_SLOTS:
    QString pluginFailureString() const;
    void updateCustomWidgetLocation(const QString &location);
    void setBoxEnabled(bool state);
    void updateCustomWidgets();
    bool initializeJambiPlugins(const QString &jambiBase, const QString &jambiPluginPath, const QString &customWidgetClassPath, const QString &resourcePath, const QString &jvm);
    void initialize();

protected:
    void resizeEvent(QResizeEvent *event);
    bool event(QEvent *event);

private:
    uint m_initialized : 1;
    static WidgetBoxW *m_self;
};

#endif //__WIDGETBOXW_H_
